import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author zengfh
 * @version 1.0
 * date 2018/04/26 17:43
 */
public class TestThread1 {
    
    private static final Logger LOGGER = LoggerFactory.getLogger(TestThread1.class);
    
    
    static class TThread extends Thread{
    
        private int num;
    
        public TThread(int num) {
            this.num = num;
        }
    
        @Override
        public void run() {
            System.out.println("now is thread " + num);
        }
    }
    
    public static void main(String[] args) throws InterruptedException {
        TThread tThread3 = new TThread(3);
        TThread tThread2 = new TThread(2);
        TThread tThread1 = new TThread(1);
        
        tThread1.start();
        tThread1.join();
        tThread2.start();
        tThread2.join();
        tThread3.start();
        tThread3.join();
    }
}
